package com.zyx.beancopy.copier.mapper;

import com.zyx.beancopy.model.Source;
import com.zyx.beancopy.model.Target;
import com.zyx.beancopy.model.ConvertedTarget;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;

/**
 * @author Yaxi.Zhang
 * @since 2022/4/21 11:22
 */
@Mapper
public interface MapStructCopier {
    @Mappings({
            @Mapping(target = "userName", source = "user_name"),
            @Mapping(target = "market_price", source = "marketPrice")
    })
    ConvertedTarget copyAndParse(Source source);

    Target copy(Source source);

}
